package com.itheima.service;

import com.itheima.dao.UserMapper;
import com.itheima.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public User login(String username, String password) {
        return userMapper.findUser(username, password);
    }

    public int register(String username, String password, String telephone) {
        return userMapper.register(username, password, telephone);
    }
}
